home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 February
/
EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso
/
earcd
/
comm2
/
termsorc.lha
/
Extras
/
Source
/
gtlayout-source.lha
/
LTP_PrintLabel.c
< prev
next >
Wrap
C/C++ Source or Header
|
1995-09-24
|
991b
|
49 lines
/* GadTools layout toolkit
**
** Copyright © 1993-1995 by Olaf `Olsen' Barthel
** Freely distributable.
*/
#include "gtlayout_global.h"
VOID __regargs
LTP_PrintLabel(LayoutHandle *handle,ObjectNode *node,UWORD left,UWORD top)
{
STRPTR label;
LONG len;
LTP_SetAPen(&handle -> RPort,handle -> TextPen);
Move(&handle -> RPort,left - (node -> LabelWidth + INTERWIDTH),top + handle -> RPort . TxBaseline);
label = node -> Label;
len = 0;
while(label[len] && (label[len] != '_'))
len++;
LockLayerRom(handle -> RPort . Layer);
if(len)
Text(&handle -> RPort,label,len);
if(label[len] == '_' && label[len + 1])
{
ULONG OldStyle;
OldStyle = SetSoftStyle(&handle -> RPort,FSF_UNDERLINED,AskSoftStyle(&handle -> RPort));
Text(&handle -> RPort,label + len + 1,1);
SetSoftStyle(&handle -> RPort,OldStyle & ~FSF_UNDERLINED,OldStyle);
label += len + 2;
if(len = strlen(label))
Text(&handle -> RPort,label,len);
}
UnlockLayerRom(handle -> RPort . Layer);
}